package com.example.demo.service.impl;

import com.example.demo.entity.Teacher;
import com.example.demo.mapper.TeacherMapper;
import com.example.demo.service.TeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherServiceImpl implements TeacherService {

    @Autowired
    TeacherMapper teacherMapper;

    @Override
    public int save(Teacher teacher) {
        return teacherMapper.save(teacher);
    }

    @Override
    public int delete(int tid) {
        return teacherMapper.delete(tid);
    }

    @Override
    public int update(Teacher teacher) {
        return teacherMapper.update(teacher);
    }

    @Override
    public List<Teacher> select() {
        return teacherMapper.select();
    }

    @Override
    public int register(Teacher teacher) {
        return teacherMapper.register(teacher);
    }
    @Override
    public List<Teacher> login() {
        return teacherMapper.login();
    }

}
